<?php

class home extends Font_Controller {
	
	public function __construct()
	{
		parent::__construct();
	}
	
	public function index()
	{
		/*$this->load->library('Image');
		$this->image->thumb('d:/wamp/www/aaa.jpg', 'd:/wamp/www/ii/aaaffffffffffff.jpg', 300, 300, 100, TRUE);
		//$this->image->cut('d:/wamp/www/hd_temp.gif', 'd:/wamp/www/ii/31_avatar_middleaaaaaaaaaaaaaaaaaaaaa.jpg', $width = 30, $height = 130, $x = 0, $y = 0, $quality = 85);
		//$this->image->water('d:/wamp/www/123abc.png', 'd:/wamp/www/31_avatar_middle.jpg', 'd:/wamp/www/ii/cccccccccc.png', $x = -20, $y = 0, $alpha = 20, $quality = 85);
		exit();*/
		$this->load->library('cart');
		$this->cart->init();
		$goods = array(
			'id' => 1,
			'name' => '商品1',
			'max_qty' => 10,
			'update_able' => true
		);
		$this->cart->add($goods);
		//$this->cart->decrease('2bc8e97313db007cdec6eb151bfd48a9', 6);
		//$this->cart->remove('2bc8e97313db007cdec6eb151bfd48a9');
		//$this->cart->save();
		//$this->cart->destory();
		var_dump($this->cart->content());
		/*$this->cart->remove('27e1e3460afe01970d126e7f8346ee0b');*/
		//$this->cart->destory();
		var_dump($this->cart->save());
		exit();
		$this->load->library('curl');
		$this->curl->init();
		echo $this->curl->add_data(array('name'=>'sufei'))->http('http://www.51youpin.com', 'GET');
		exit();
		$this->load->library('page');
		$config = array(
			'base_url' => site_url('home/index'),
			'current_page' => get('p'),
			'total_rows' => 1999,
			'num_links' => 10
			);
		$this->page->config($config)->init();
		echo $this->page->total();
		echo $this->page->current();
		echo $this->page->rows();
		echo $this->page->first();
		echo $this->page->prev();
		echo $this->page->index(TRUE);
		echo $this->page->next();
		echo $this->page->last();
		echo $this->page->select();
		echo $this->page->search();
		exit();
		require_once FCPATH.APPPATH.'libraries/sphinxapi.php';
		$s = new SphinxClient();
		$s->SetServer('localhost', 9312);
		$s->SetMatchMode( SPH_MATCH_EXTENDED );
		$result = $s->Query('放大镜 放大', 'test1');
		var_dump($result);
		exit();
		$this->load->library('fenci');
		$this->fenci->init();
		var_dump($this->fenci->run('尼康 S2600 大牌品质，无敌特惠！'));
		exit();
		$this->load->library('kindeditor');
		$config = array(
			'path' => '/codeigniter/public/kindeditor',
			'theme' => 'default',
			'file_upload_url' => '/codeigniter/index.php/kindeditor/upload',
			'file_manage_url' => '/codeigniter/index.php/kindeditor/manage'
		);
		$this->kindeditor->config($config);
		echo '<!doctype html>
<html>
<head></head><body>';
		echo $this->kindeditor->show();
		echo '</body></html>';
	}
	
}